import request from '@/utils/request'

// 查询潜在客户列表
export function listClients(query) {
  return request({
    url: '/custom/clients/list',
    method: 'get',
    params: query
  })
}

// 查询潜在客户详细
export function getClients(id) {
  return request({
    url: '/custom/clients/' + id,
    method: 'get'
  })
}

// 分配咨询
export function addTeacherClients(id) {
  return request({
    url: '/custom/clients/addTeacherClients/' + id,
    method: 'post'
  })
}
// 存储所有老师信息
export function saveTeacherClients() {
  return request({
    url: '/custom/consulting',
    method: 'get'
  })
}

// 新增潜在客户
export function addClients(data) {
  return request({
    url: '/custom/clients',
    method: 'post',
    data: data
  })
}
// 潜在客户转正
export function regularClients(id) {
  return request({
    url: '/custom/clients/regular/'+id,
    method: 'post',
  })
}

// 修改潜在客户
export function updateClients(data) {
  return request({
    url: '/custom/clients',
    method: 'put',
    data: data
  })
}

// 删除潜在客户
export function delClients(id) {
  return request({
    url: '/custom/clients/' + id,
    method: 'delete'
  })
}
